package com.tencreat.domain.account;

import com.baomidou.mybatisplus.annotation.*;
import com.tencreat.common.enums.BalanceBusinessType;
import com.tencreat.common.enums.BalanceTypeEnum;
import com.tencreat.common.enums.BusinessType;
import io.swagger.annotations.ApiModelProperty;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.tencreat.common.annotation.Excel;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import com.tencreat.common.core.domain.dto.BaseEntityDTO;


/**
 * 代采购额度变动记录对象 recharge_limit_change
 *
 * @author tencreat
 * @company 深圳腾创互联科技有限公司
 * @link https://tencreat.com
 * @since 2023-11-16
 */
@Data
@EqualsAndHashCode(callSuper = true)
@AllArgsConstructor
@NoArgsConstructor
@TableName("recharge_limit_change")
public class RechargeLimitChange extends BaseEntityDTO<RechargeLimitChange> {

    @TableId(type = IdType.AUTO)
    private Long id;

    @Excel(name = "用户uuid")
    @ApiModelProperty(value= "用户uuid")
    @TableField("`uuid`")
    private Long uuid;

    @Excel(name = "变动金额")
    @ApiModelProperty(value= "变动金额")
    @TableField("`chang_amount`")
    private BigDecimal changAmount;

    @Excel(name = "剩余余额")
    @ApiModelProperty(value= "剩余余额")
    @TableField("`balance`")
    private BigDecimal balance;

    @Excel(name = "1 收入, 2支出")
    @ApiModelProperty(value= "1 收入, 2支出")
    @TableField("`type`")
    private String type;

    @Excel(name = "业务类型")
    @ApiModelProperty(value= "业务类型")
    @TableField("`business_type`")
    private BalanceBusinessType businessType;

    @Excel(name = "来源")
    @TableField("`source`")
    private String source;

    @TableField(value = "`create_time`", fill = FieldFill.INSERT)
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;

    @TableField(value = "`update_by`", fill = FieldFill.UPDATE)
    private String updateBy;

    @TableField(value = "`update_time`", fill = FieldFill.UPDATE)
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updateTime;

    @Excel(name = "备注")
    @ApiModelProperty(value= "备注")
    @TableField("`remarks`")
    private String remarks;

    @Excel(name = "变动之前余额")
    @ApiModelProperty(value= "变动之前余额")
    @TableField("`balance_before`")
    private BigDecimal balanceBefore;

    @Excel(name = "余额类型")
    @ApiModelProperty(value= "余额类型")
    @TableField("`balance_type`")
    private BalanceTypeEnum balanceType;

    @ApiModelProperty(value= "手机号码")
    @TableField(exist = false)
    private String mobile;

}
